#include<stdio.h>
#include<conio.h>

int cycleLength(long int n)
{
	long int dem=1;
    if(n==1) return 0;
    while(n!=1)
	{
	   if(n%2==0)
	   {
	     n/=2;
	     dem++;
	   }
	   else 
	   {
	     n=(3*n)+1;
	     dem++;
	   }
    }
    return dem;
}

void swap(int a, int b)
{
	int temp;
	temp = a;
	a = b;
	b = temp;
}

int between(int i, int j)
{
	long int n, max;
	int c;
	while (scanf("%ld  %ld", &i,&j)!=EOF)
	{
	if(i>j)  
	swap(i,j);
	max=cycleLength(i);
	for(c=i;c<j;c++)
	 if(max<cycleLength(c))
	  max=cycleLength(c);
	  printf("%ld %ld %ld", i, j, max);
    }
}
main()
{
	long int i,j;
	between(i,j);
	getch();
}
